package com.tarena.dubbo.stock.web.rpc;

import com.tarena.dubbo.stock.api.StockApi;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;


@DubboService
@Service
@Slf4j
public class StockApiImpl implements StockApi {
    @Override
    public boolean reduceStock(String productId, int count) {
        log.info("当前商品:{},减少了库存:{}",productId,count);
        return true;
    }
}
